#include <stdlib.h>
#include <string.h>
#include "cplus.h"
#include "c.h"
#include <stdio.h>
#include <iostream>
#include <cstring>
using namespace std;

char* test(char* line1) {
     A *a = new A();
     double* doubleArr;
     doubleArr =  a->test(line1);
     //printf("doubleArr[0] is %f\n",doubleArr[0]);
     //printf("doubleArr[1] is %f\n",doubleArr[1]);

     char strN1[50];//转换后的字符串
     char strN2[50] = "and";
     char strN3[50];
     //将字节double* 转换成字符串
     sprintf(strN1, "%.6f", doubleArr[0]);
     sprintf(strN3, "%.6f", doubleArr[1]);


     char *charret = (char *) malloc(strlen(strN1)+ strlen(strN2)+strlen(strN3));
     strcpy(charret, strN1);
     strcat(charret,strN2);
     strcat(charret, strN3);
     //printf("charret: %s\n", charret);
     return charret;
}